package cn.edu.gxu.xingjian.teacherassistant.domain;

import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class MajorGrade {

    @NotNull
    @Size(min = 2)
    private String name;

    @NotNull
    @Size(min = 4, max = 4)
    private String grade;

    private int classes;

    @ManyToOne
    private College college;
}
